home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / sound / simul100.zip / SIMUL.DOC < prev    next >
Text File  |  1995-12-27  |  3KB  |  73 lines

  1.                                   S I M U L
  2.                                     v1.00
  3.                                 Ethan Brodsky
  4.                                   12/27/1995
  5.  
  6. SIMUL - Simultaneous recording and playback on the SB16
  7. Copyright 1995 by Ethan Brodsky.  All right reserved.
  8.  
  9. ***********************************************************************
  10.  
  11. A recurring topic in sound programming newsgroups is the possibility of
  12. simultaneous recording (A/D) and playback (D/A) on Sound Blaster sound
  13. cards.
  14.  
  15. Early in 1995, I released a package called SBProcess, which was supposed
  16. to do this by using polled "direct" sampling.  Unfortunately, this
  17. method only worked on certain SB models, mostly older cards, and the
  18. sound quality was horrible.  The method only supported 8-bit mono sound,
  19. and the highest sampling rate I could reach was about 10khz.
  20.  
  21. After the failure of that method, I realized that the SB16 supported two
  22. DMA channels, and could possibly be used for simultaneous sound.  The
  23. SB16 has separate command for 8-bit and 16-bit sampling, as well as for
  24. recording and playback.  I had been recommending this method to all who
  25. asked, but I hadn't tried it out for myself.  (Although a package using
  26. this method has since been released, source code to it is not freely
  27. available)
  28.  
  29. Now that I have some free time, I decided to try it out for myself.  The
  30. result is a Borland C real-mode module supporting 16-bit input and 8-bit
  31. output simultaneously.  I have also written an example program using the
  32. module.  It implements an "echo", outputting whatever it hears, with a
  33. delay.  The code only supports the SB16, but it will work all the way up
  34. to 44khz, and the method can also be used for stereo sound.  The only
  35. limitation is that the two types of I/O be done using different DMA
  36. channels.  I have found no way to solve this problem.
  37.  
  38. The code may be freely distributed in its original form as long as the
  39. copyright notice and documentation are included, preferably contained in
  40. the original ZIP file.  The code or method explained in it may be used
  41. for any purpose. Please give credit to Ethan Brodsky.  I would also
  42. appreciate it if you would tell me how you are using it.  If it is being
  43. used for commercial purposes, I would appreciate a contribution.
  44.  
  45. The demo program is configured for my SB16, at 220h/5/1/5. If you have
  46. a different configuration, you must change the constants in the DELAY.C.
  47. I had to use some conditional compiliation directives to get the SIMUL
  48. module to compile in all memory models, but I was unable to get the
  49. DELAY demo program to work in anything but the large model.
  50.  
  51. I haven't written this code to handle all errors, but it should work on
  52. any sound card that supports this method.  I'm not sure whether the
  53. interrupt status register is supported on all compatibles, so the code
  54. may have to be modified for them.  The newest version will always be
  55. available from my WWW page, as well as the simtel and x2ftp public FTP
  56. sites.
  57.  
  58. I hope you find this useful,
  59.     Ethan Brodsky
  60.  
  61. Address:  Ethan Brodsky
  62.           4010 Cherokee Dr.
  63.           Madison, WI
  64.           53711
  65.  
  66. Phone:    (608) 238-4830
  67.  
  68. email:    ebrodsky@pobox.com
  69.           ericbrodsky@psl.wisc.edu (Temporarily)
  70.  
  71. www:      http://www.pobox.com/~ebrodsky/
  72.           http://www.xraylith.wisc.edu/~ebrodsky/
  73.